# -*- coding: utf-8 -*-
import pandas as pd


def CalculateDomainSize(gridSize):
    centerX = 399644
    centerY = 410200
    min_x = centerX - gridSize
    min_y = centerY - gridSize
    max_x = centerX + gridSize
    max_y = centerY + gridSize
    # four point
    bottom_left = (min_x, min_y)
    bottom_right = (max_x, min_y)
    top_left = (min_x, max_y)
    top_right = (max_x, max_y)

    coord = []
    coord.append(bottom_left)
    coord.append(bottom_right)
    coord.append(top_right)
    coord.append(top_left)
    coord.append(bottom_left)

    return coord


if __name__ == '__main__':
    coord = CalculateDomainSize(405000)
    frame = pd.DataFrame(coord, columns=['x', 'y'])
    frame.to_csv(r'F:/Experiment/Research/Data/CSV/British_National_Grid/810.csv', sep=',')
